public class Main {

    public final String name = "fuck";//final修饰实例成员变量
    public static void main(String[] args) {
       final String school_name = "fjut";
      // school_name = "fjutyyds"; //final修饰局部变量 无法二次赋值

        final wolf wolf = new wolf("wolf");
        System.out.println(wolf.name);
        wolf.name = "dog";
        System.out.println(wolf.name);
        //final修饰引用变量类型，地址不能改变，但是地址上的内容可以改变
    }
    public static final  String SCHOOL_NAME = "fjut";//final修饰静态成员变量

}

 /*final修饰类，无法继承*/ class Animals{

}


class wolf extends Animals{
     String name;
    public wolf() {
    }

    public wolf(String name) {
        this.name = name;
    }
}
